package com.lzw.breezeNovel.webApp.mapper.novel;

import com.lzw.breezeNovel.model.entity.pojo.novel.Rating;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.mapper
 * @date 2025/3/2
 * @description 评分mapper
 */
@Mapper
@SuppressWarnings("all")
public interface RatingMapper {

    /**
     * 插入评分
     * @param ratings
     */
    void insert(Rating ratings);


    /**
     * 根据小说id和用户id查询评分表判断当前用户是否评分过了
     * @param bookId
     * @param userId
     * @return
     */
    Rating selectRatingByBookIdAndUserId(Integer bookId, Long userId);

}
